package org.jha.relay.pci1761;

import org.jha.base.BaseStructure;

import com.sun.jna.Native;
import com.sun.jna.NativeLong;
import com.sun.jna.ptr.LongByReference;
import com.sun.jna.ptr.ShortByReference;
import com.sun.jna.win32.StdCallLibrary;

public interface PCI1761Lib extends StdCallLibrary {
//	public PCI1761Lib INSTANCE = (PCI1761Lib) Native.loadLibrary(
//			"C:\\Windows\\SysWOW64\\Adsapi32", PCI1761Lib.class);
	
	public PCI1761Lib INSTANCE = (PCI1761Lib) Native.loadLibrary(
			"C:\\Windows\\System32\\Adsapi32", PCI1761Lib.class);

	// public PCI1761Lib INSTANCE = (PCI1761Lib) Native.loadLibrary(
	// "C:\\Windows\\System32\\AdvDIO", PCI1761Lib.class);

	public static class PT_DioReadPortByte extends BaseStructure {
		public short port;
		public ShortByReference value;
	}

	long DRV_DeviceOpen(NativeLong DeviceNum, LongByReference DriverHandle);

	long DRV_DeviceClose(LongByReference DriverHandle);

	long DRV_DioReadPortByte(NativeLong DriverHandle,
			PT_DioReadPortByte lpDioReadPortByte);

}
